<%--
  Created by IntelliJ IDEA.
  User: haol
  Date: 2016/9/23
  Time: 23:21
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <%@ include file="/common/meta.jsp" %>
    <link rel="stylesheet" type="text/css" href="${ctx}/js/lib/validate/validate.css">
    <script type="text/javascript" src="${ctx}/js/lib/validate/jquery.validate.min.js"></script>
    <script type="text/javascript" src="${ctx}/js/lib/validate/jquery.validate.common_rules.js"></script>
    <script type="text/javascript" src="${ctx}/js/lib/validate/messages_cn.js"></script>
    <script type="text/javascript" src="${ctx}/js/gcu/room/edit.js"></script>
</head>
<body>
<div>
    <ul class="breadcrumb">
        <li class="icon"></li>
        <li>您所在的位置：</li>
        <li>系统管理</li>
        <li>房屋管理</li>
        <li>${empty id ? "新增" : "修改"}</li>
    </ul>
    <%@ include file="/common/top.jsp" %>
    <div class="widget widget-table">
        <div class="widget-content" id="formDiv">
            <form>
                <input type="hidden" name="id" value="${id}"/>
                <input type="hidden" name="buildId" value="${buildId}"/>
            </form>
        </div>
    </div>
</div>
</body>
</html>
<script type="text/template" id="roomTmp">
    <div class="widget-content" style="width: 80%;margin: 0 auto">
        <table class="pn-ftable table-bordered" border="0" cellpadding="10">
            <tbody class="_edit">
            <tr>
                <th colspan="2" style="text-align:center;">房屋信息：</th>
            </tr>
            <tr>
                <th><span class="point">*</span>楼宇名：</th>
                <td class="pn-fcontent form-inline">
                    <@ if(room.buildName != null ){@>
                    <input type="text" name="buildName" maxlength="50" class="form-control" value="<@=room.buildName@>"
                           disabled/>
                    <@}else{@>
                    <select name="buildName" class="form-control">
                        <option value="">请选择</option>
                        <c:forEach var="builds" items="${build_list}" >
                            <option value="${builds.buildName}">${builds.buildName}</option>
                        </c:forEach>
                    </select>
                    <@}@>
                </td>
            </tr>
            <tr>
                <th><span class="point">*</span>房间号：</th>
                <td class="pn-fcontent form-inline">
                    <@ if(room.roomNum != null ){@>
                    <input type="text" name="roomNum" maxlength="50" class="form-control" value="<@=room.roomNum@>"disabled/>
                    <@}else{@>
                    <input type="text" name="roomNum" maxlength="50" class="form-control" value="<@=room.roomNum@>"/>
                    <@}@>
                </td>
            </tr>
            <tr>
                <th><span class="point">*</span>房屋面积：</th>
                <td class="pn-fcontent form-inline">
                    <input type="text" name="area" maxlength="50" class="form-control" value="<@=room.area@>"/>
                </td>
            </tr>
            <tr>
                <th><span class="point"></span>业主：</th>
                <td class="pn-fcontent form-inline">
                    <@if(room.ownerId != null) @>
                    <input type="text" name="ownerName" maxlength="50" class="form-control" value="<@=room.ownerName@>"disabled/>
                    <@else{@>
                    <input type="text" name="ownerName" maxlength="50" class="form-control" value="未入住"disabled/>
                    <@}@>
                </td>
            </tr>
            <tr>
                <th><span class="point">*</span>创建时间：</th>
                <td class="pn-fcontent form-inline">
                    <input type="text" name="createTime" maxlength="50" class="form-control" value="<@=room.createTime@>"disabled/>
                </td>
            </tr>
            <tr>
                <td class="pn-fcontent text-center" colspan="2">
                    <button type="button" class="btn btn-info" id="saveBtn">保存</button>
                    <button type="button" class="btn btn-default" id="backBtn">返回</button>
                </td>
            </tr>
            </tbody>
        </table>
    </div>
</script>